package com.demo.quartz.jobs;

import org.quartz.*;

import java.util.ArrayList;
import java.util.Date;

/**
 * @author chenx
 * @Description :
 * @create 2020-05-15 16:32
 */
public class DumbJob implements Job {
    public String jobSays;
    public float myFloatValue;
    public ArrayList state;


    public void execute(JobExecutionContext context) throws JobExecutionException {
        //@do something

        JobKey key = context.getJobDetail().getKey();

//        JobDataMap dataMap = context.getMergedJobDataMap();
        state.add(new Date());
        this.setJobSays("hello DumbJob");
        this.setMyFloatValue(5.21f);
        this.setState(state);
        System.err.println("Instance " + key + " of DumbJob says: " + jobSays + ", and val is: " + myFloatValue);
    }

    public String getJobSays() {
        return jobSays;
    }

    public void setJobSays(String jobSays) {
        this.jobSays = jobSays;
    }

    public float getMyFloatValue() {
        return myFloatValue;
    }

    public void setMyFloatValue(float myFloatValue) {
        this.myFloatValue = myFloatValue;
    }

    public ArrayList getState() {
        return state;
    }

    public void setState(ArrayList state) {
        this.state = state;
    }
}
